<script src="../../../../static/admin/js/jquery.min.js"></script>
<div th:fragment="js">
<!-- js部分 -->
<script type="text/javascript" th:src="@{/component/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/admin/js/jquery.min.js}"></script>
    <script type="text/javascript">
            function logout() {
                $.ajax({
                    url: '/logout',
                    dataType: 'json',
                    type: 'post',
                    success: function (result) {
                        if (result.success) {
                            location.href = "/front/index";
                        }
                    }
                });
            }
    </script>
</div>